package com.stu.bean;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class OrdersExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrdersExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andOidIsNull() {
            addCriterion("oid is null");
            return (Criteria) this;
        }

        public Criteria andOidIsNotNull() {
            addCriterion("oid is not null");
            return (Criteria) this;
        }

        public Criteria andOidEqualTo(Integer value) {
            addCriterion("oid =", value, "oid");
            return (Criteria) this;
        }

        public Criteria andOidNotEqualTo(Integer value) {
            addCriterion("oid <>", value, "oid");
            return (Criteria) this;
        }

        public Criteria andOidGreaterThan(Integer value) {
            addCriterion("oid >", value, "oid");
            return (Criteria) this;
        }

        public Criteria andOidGreaterThanOrEqualTo(Integer value) {
            addCriterion("oid >=", value, "oid");
            return (Criteria) this;
        }

        public Criteria andOidLessThan(Integer value) {
            addCriterion("oid <", value, "oid");
            return (Criteria) this;
        }

        public Criteria andOidLessThanOrEqualTo(Integer value) {
            addCriterion("oid <=", value, "oid");
            return (Criteria) this;
        }

        public Criteria andOidIn(List<Integer> values) {
            addCriterion("oid in", values, "oid");
            return (Criteria) this;
        }

        public Criteria andOidNotIn(List<Integer> values) {
            addCriterion("oid not in", values, "oid");
            return (Criteria) this;
        }

        public Criteria andOidBetween(Integer value1, Integer value2) {
            addCriterion("oid between", value1, value2, "oid");
            return (Criteria) this;
        }

        public Criteria andOidNotBetween(Integer value1, Integer value2) {
            addCriterion("oid not between", value1, value2, "oid");
            return (Criteria) this;
        }

        public Criteria andOimgIsNull() {
            addCriterion("oimg is null");
            return (Criteria) this;
        }

        public Criteria andOimgIsNotNull() {
            addCriterion("oimg is not null");
            return (Criteria) this;
        }

        public Criteria andOimgEqualTo(String value) {
            addCriterion("oimg =", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgNotEqualTo(String value) {
            addCriterion("oimg <>", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgGreaterThan(String value) {
            addCriterion("oimg >", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgGreaterThanOrEqualTo(String value) {
            addCriterion("oimg >=", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgLessThan(String value) {
            addCriterion("oimg <", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgLessThanOrEqualTo(String value) {
            addCriterion("oimg <=", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgLike(String value) {
            addCriterion("oimg like", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgNotLike(String value) {
            addCriterion("oimg not like", value, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgIn(List<String> values) {
            addCriterion("oimg in", values, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgNotIn(List<String> values) {
            addCriterion("oimg not in", values, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgBetween(String value1, String value2) {
            addCriterion("oimg between", value1, value2, "oimg");
            return (Criteria) this;
        }

        public Criteria andOimgNotBetween(String value1, String value2) {
            addCriterion("oimg not between", value1, value2, "oimg");
            return (Criteria) this;
        }

        public Criteria andOnameIsNull() {
            addCriterion("oname is null");
            return (Criteria) this;
        }

        public Criteria andOnameIsNotNull() {
            addCriterion("oname is not null");
            return (Criteria) this;
        }

        public Criteria andOnameEqualTo(String value) {
            addCriterion("oname =", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotEqualTo(String value) {
            addCriterion("oname <>", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameGreaterThan(String value) {
            addCriterion("oname >", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameGreaterThanOrEqualTo(String value) {
            addCriterion("oname >=", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameLessThan(String value) {
            addCriterion("oname <", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameLessThanOrEqualTo(String value) {
            addCriterion("oname <=", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameLike(String value) {
            addCriterion("oname like", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotLike(String value) {
            addCriterion("oname not like", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameIn(List<String> values) {
            addCriterion("oname in", values, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotIn(List<String> values) {
            addCriterion("oname not in", values, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameBetween(String value1, String value2) {
            addCriterion("oname between", value1, value2, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotBetween(String value1, String value2) {
            addCriterion("oname not between", value1, value2, "oname");
            return (Criteria) this;
        }

        public Criteria andOnumIsNull() {
            addCriterion("onum is null");
            return (Criteria) this;
        }

        public Criteria andOnumIsNotNull() {
            addCriterion("onum is not null");
            return (Criteria) this;
        }

        public Criteria andOnumEqualTo(Integer value) {
            addCriterion("onum =", value, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumNotEqualTo(Integer value) {
            addCriterion("onum <>", value, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumGreaterThan(Integer value) {
            addCriterion("onum >", value, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumGreaterThanOrEqualTo(Integer value) {
            addCriterion("onum >=", value, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumLessThan(Integer value) {
            addCriterion("onum <", value, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumLessThanOrEqualTo(Integer value) {
            addCriterion("onum <=", value, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumIn(List<Integer> values) {
            addCriterion("onum in", values, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumNotIn(List<Integer> values) {
            addCriterion("onum not in", values, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumBetween(Integer value1, Integer value2) {
            addCriterion("onum between", value1, value2, "onum");
            return (Criteria) this;
        }

        public Criteria andOnumNotBetween(Integer value1, Integer value2) {
            addCriterion("onum not between", value1, value2, "onum");
            return (Criteria) this;
        }

        public Criteria andUpriceIsNull() {
            addCriterion("uprice is null");
            return (Criteria) this;
        }

        public Criteria andUpriceIsNotNull() {
            addCriterion("uprice is not null");
            return (Criteria) this;
        }

        public Criteria andUpriceEqualTo(Float value) {
            addCriterion("uprice =", value, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceNotEqualTo(Float value) {
            addCriterion("uprice <>", value, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceGreaterThan(Float value) {
            addCriterion("uprice >", value, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceGreaterThanOrEqualTo(Float value) {
            addCriterion("uprice >=", value, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceLessThan(Float value) {
            addCriterion("uprice <", value, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceLessThanOrEqualTo(Float value) {
            addCriterion("uprice <=", value, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceIn(List<Float> values) {
            addCriterion("uprice in", values, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceNotIn(List<Float> values) {
            addCriterion("uprice not in", values, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceBetween(Float value1, Float value2) {
            addCriterion("uprice between", value1, value2, "uprice");
            return (Criteria) this;
        }

        public Criteria andUpriceNotBetween(Float value1, Float value2) {
            addCriterion("uprice not between", value1, value2, "uprice");
            return (Criteria) this;
        }

        public Criteria andTpriceIsNull() {
            addCriterion("tprice is null");
            return (Criteria) this;
        }

        public Criteria andTpriceIsNotNull() {
            addCriterion("tprice is not null");
            return (Criteria) this;
        }

        public Criteria andTpriceEqualTo(Float value) {
            addCriterion("tprice =", value, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceNotEqualTo(Float value) {
            addCriterion("tprice <>", value, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceGreaterThan(Float value) {
            addCriterion("tprice >", value, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceGreaterThanOrEqualTo(Float value) {
            addCriterion("tprice >=", value, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceLessThan(Float value) {
            addCriterion("tprice <", value, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceLessThanOrEqualTo(Float value) {
            addCriterion("tprice <=", value, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceIn(List<Float> values) {
            addCriterion("tprice in", values, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceNotIn(List<Float> values) {
            addCriterion("tprice not in", values, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceBetween(Float value1, Float value2) {
            addCriterion("tprice between", value1, value2, "tprice");
            return (Criteria) this;
        }

        public Criteria andTpriceNotBetween(Float value1, Float value2) {
            addCriterion("tprice not between", value1, value2, "tprice");
            return (Criteria) this;
        }

        public Criteria andUseridIsNull() {
            addCriterion("userid is null");
            return (Criteria) this;
        }

        public Criteria andUseridIsNotNull() {
            addCriterion("userid is not null");
            return (Criteria) this;
        }

        public Criteria andUseridEqualTo(Integer value) {
            addCriterion("userid =", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridNotEqualTo(Integer value) {
            addCriterion("userid <>", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridGreaterThan(Integer value) {
            addCriterion("userid >", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridGreaterThanOrEqualTo(Integer value) {
            addCriterion("userid >=", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridLessThan(Integer value) {
            addCriterion("userid <", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridLessThanOrEqualTo(Integer value) {
            addCriterion("userid <=", value, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridIn(List<Integer> values) {
            addCriterion("userid in", values, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridNotIn(List<Integer> values) {
            addCriterion("userid not in", values, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridBetween(Integer value1, Integer value2) {
            addCriterion("userid between", value1, value2, "userid");
            return (Criteria) this;
        }

        public Criteria andUseridNotBetween(Integer value1, Integer value2) {
            addCriterion("userid not between", value1, value2, "userid");
            return (Criteria) this;
        }

        public Criteria andOdateIsNull() {
            addCriterion("odate is null");
            return (Criteria) this;
        }

        public Criteria andOdateIsNotNull() {
            addCriterion("odate is not null");
            return (Criteria) this;
        }

        public Criteria andOdateEqualTo(Date value) {
            addCriterionForJDBCDate("odate =", value, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("odate <>", value, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateGreaterThan(Date value) {
            addCriterionForJDBCDate("odate >", value, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("odate >=", value, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateLessThan(Date value) {
            addCriterionForJDBCDate("odate <", value, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("odate <=", value, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateIn(List<Date> values) {
            addCriterionForJDBCDate("odate in", values, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("odate not in", values, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("odate between", value1, value2, "odate");
            return (Criteria) this;
        }

        public Criteria andOdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("odate not between", value1, value2, "odate");
            return (Criteria) this;
        }

        public Criteria andPaystateIsNull() {
            addCriterion("paystate is null");
            return (Criteria) this;
        }

        public Criteria andPaystateIsNotNull() {
            addCriterion("paystate is not null");
            return (Criteria) this;
        }

        public Criteria andPaystateEqualTo(String value) {
            addCriterion("paystate =", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateNotEqualTo(String value) {
            addCriterion("paystate <>", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateGreaterThan(String value) {
            addCriterion("paystate >", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateGreaterThanOrEqualTo(String value) {
            addCriterion("paystate >=", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateLessThan(String value) {
            addCriterion("paystate <", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateLessThanOrEqualTo(String value) {
            addCriterion("paystate <=", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateLike(String value) {
            addCriterion("paystate like", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateNotLike(String value) {
            addCriterion("paystate not like", value, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateIn(List<String> values) {
            addCriterion("paystate in", values, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateNotIn(List<String> values) {
            addCriterion("paystate not in", values, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateBetween(String value1, String value2) {
            addCriterion("paystate between", value1, value2, "paystate");
            return (Criteria) this;
        }

        public Criteria andPaystateNotBetween(String value1, String value2) {
            addCriterion("paystate not between", value1, value2, "paystate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}